

CREATE TABLE [dbo].[ThreadActions](
	[IdAction] [bigint] IDENTITY(1,1) NOT NULL,
	[IdThread] [bigint] NOT NULL,
	[IdUser] [bigint] NOT NULL,
	[CodeAction] [varchar](6) NOT NULL,
	[Params] [varchar](256) NULL,
	[DateAction] [datetime2](7) NOT NULL,
 CONSTRAINT [PK_ThreadActions] PRIMARY KEY CLUSTERED 
(
	[IdAction] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[ThreadActions] ADD  CONSTRAINT [DF_ThreadActions_DateAction]  DEFAULT (getdate()) FOR [DateAction]

